function findFriend(){
    if($("#friendEmail").val().trim() != "" && $("#friendEmail").val().length > 2){ //RESTRICTED TO len 3+ (limits insane result #'s)
        $("#friendsDisplay").load("./AutoFillFriendsServlet?param=" + $("#friendEmail").val());
    }
    else{
        $("#friendsDisplay").html("");
    }
}

function displayDialog(){
    $("#addFriendDialog").attr("class","visible");
    $("#closeButton").attr("class","visible");
}
function closeDialog(){
    $("#addFriendDialog").attr("class","invisible");
    $("#friendEmail").css("background-color","#FFFFFF");
    $("#friendsDisplay").html("");
    $("#closeButton").attr("class","invisible");
}
function clearBox(){
    $("#friendEmail").val("");
    $("#friendEmail").css("background-color","#FFFFFF");
}
function refill(){
    var email = $("#friendEmail").val();
    if(email == ""){
        $("#friendEmail").val("Email");
        $("#friendEmail").css("background-color","#FFFFFF");
    }
}